home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 194_01 / stdio.h < prev    next >
Text File  |  1985-11-13  |  2KB  |  70 lines

  1. /* [STDIO.H of JUGPDS Vol.17]
  2. *****************************************************************
  3. *                                *
  4. *    Written by  Hakuo Katayose (JUG-CP/M No.179)        *
  5. *            49-114 Kawauchi-Sanjuunin-machi        *
  6. *            Sendai, Miyagi 980                          *
  7. *            Phone: 0222-61-3219                *
  8. *                                *
  9. *    Edited & tested by Y. Monma (JUG-C/M Disk Editor)       * 
  10. *                                *
  11. *****************************************************************
  12. */
  13.  
  14. /* stdio.h - Standard I/O Header for Software Tools */
  15.  
  16. #include <bdscio.h>
  17.  
  18. /*
  19.  *    Definitions for CP/M 
  20.  */
  21.  
  22.  
  23. #define STDIN  0
  24. #define STDOUT 1
  25. #define STDLST 2
  26. #define DEVRDR 3
  27. #define DEVPUN 3
  28. #define STDERR 4
  29.  
  30. #define LETTER 'a'
  31. #define DIGIT  '0'
  32.  
  33. #define YES    1
  34. #define NO     0
  35.  
  36. #define EOS        '\0'
  37. #define CPMBREAK    0x003
  38. #define BELL        0x007
  39. #define BACKSPACE    0x008
  40. #define TAB        '\t'
  41. #define CRETURN        '\r'
  42. #define VT        0x00b
  43. #define FORMFEED    0x00c
  44. #define NEWLINE        '\n'
  45. #define ESC        0x01b
  46. #define SPACE        ' '
  47. #define BLANK        ' '
  48.  
  49.  
  50. /*
  51.  *    macros
  52.  */
  53.  
  54. /*
  55. #define abs(x)        ((x) < 0 ? -(x) : (x))
  56. #define isalpha(c)    (islower(c) || isupper(c))
  57. #define isdigit(c)    ('0' <= (c) && (c) <= '9')
  58. #define islower(c)    ('a' <= (c) && (c) <= 'z')
  59. #define isupper(c)    ('A' <= (c) && (c) <= 'Z')
  60. #define iswhite(c)    ((c) <= ' ' || 0177 <= (c)) /* ASCII ONLY */
  61. #define isspace(c)    ((c) == ' ' || (c) == '\t' || (c) == '\n')
  62. #define tolower(c)    (isupper(c) ? ((c) + ('a' - 'A')) : (c))
  63. #define toupper(c)    (islower(c) ? ((c) - ('a' - 'A')) : (c))
  64. */
  65.  
  66. #define max(x, y)    (((x) < (y)) ? (y) : (x))
  67. #define min(x, y)    (((x) < (y)) ? (x) : (y))
  68.  
  69. #define remark(str)    (fprintf(STDERR,"%s\n",(str)))
  70.